Replication materials for "Who votes more strategically? Evidence from Canada" (Eggers, Rubenson, Loewen)

8 December 2020 

To output the figures and table appearing in the paper:

1. run data_prep_imputation_part.r: does multiple imputation on a cleaned, reorganized, and reduced version of the LPP; outputs lists_for_analysis.RData.
2. run pivotality_calcs.r: computes pivot probabilities from forecasts and actual results for various levels of precision, outputs several CSVs of pivot probabilities and a sheet with vote shares per party and riding
3. run analysis_code.r (it depends on the previous 2): outputs many figures (including ones that do not appear in the paper) and one table.

To get from the raw LPP data to step 1, there is data_preprep.R. The input to this is the raw LPP dataset, which cannot yet be shared. We provide the code we used to output the input to step 1, plus the codebook, so that users can see how the raw data is processed. 

Dependencies: Amelia, mclogit, lfe, readstata13, gtools